﻿"use strict";
/**
 * 计算器类
 * @param {any} $
 */
var ComputeTool = (function ($) {

    /**
     * 加法
     * @param {any} summand
     * @param {any} augend
     */
    function add(summand, augend) {
        return summand + augend;
    }

    /**
     * 减法
     * */
    //const subtraction = (minuend,subtrahend ) => {  minuend-subtrahend  };
    var subtraction = new Function("minuend", "subtrahend", "return  minuend-subtrahend ");

    /**
     * 乘法
     * @param {any} multiplier
     * @param {any} faciend
     */
    var multiplication = function (multiplier, faciend) {
        return multiplier * faciend;
    }


    /**
     * 除法
     * */
    divisionMethod: function divisionMethod(dividend, divisor) {
        try {
            return dividend / divisor;
        } catch (e) {
            return e.message;
        } finally {

        }
    }

    /**
     * 百分比
     * @param {any} numberValue
     */
    var hundredth = function (numberValue) {
        return numberValue / 100;
    }
});